home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-07-15 | 2.9 KB | 115 lines | [TEXT/MPS ] |
- # to build the applicaiton execute the following line on the worksheet
- #
- # BuildDoubleBuffer
- #
- # there are some build options which can be added after the above command:
- #
- # -e build everything
- # -Debug include any asserts used with debugging
- # -Verbose include message displayed in the debugger
- #
- # for example, to build a fully debug version with messages you execute:
- #
- # BuildDoubleBuffer -Debug -Verbose
- #
- # NOTE: it may be necessary to use the -e (build everything) option if you've
- # already built some of the objects but later changed an option. This is
- # necessary after building a -Debug version and then requesting -Verbose
-
-
- # set the default options
- Set COptions "{COptions} -opt full -r -mbg off -d _DEBUG=false -d _VERBOSE=false"
- Set ROptions "-d forRez -d SystemSevenOrLater=1 -append"
-
-
- # if no parameters were passed, then we're doing a non-debug version
- If {#} == 0
- Set ObjFolder :NonDebugObjects:
- Set COptions "{COptions} -k {ObjFolder}"
- Else
-
- # now we're building a debug version, check for the options
- # if an option is true then replace the default setting for the new one
- Loop
- If "{1}" == "-Debug"
- If "{COptions}" =~ /(≈)®1_DEBUG=false(≈)®2/
- Set COptions "{®1}_DEBUG=true{®2}"
- End
- If "{COptions}" =~ /(≈)®1mbg off(≈)®2/
- Set COptions "{®1}mbg on{®2}"
- End
- Else If "{1}" == "-Verbose"
- If "{COptions}" =~ /(≈)®1_VERBOSE=false(≈)®2/
- Set COptions "{®1}_VERBOSE=true{®2}"
- End
- If "{COptions}" =~ /(≈)®1mbg off(≈)®2/
- Set COptions "{®1}mbg on{®2}"
- End
- Else If "{1}" == "-e"
- Set MOptions "-e"
-
- # check for any unknown option
- Else
- Echo "Illegal option: {1}" > dev:StdErr
- Exit 1
- End
-
- # shift to the next parameter and test the loop conditional
- Shift
- Break If {#} == 0
- End
-
- # since we're building a debug version put it into in debugging folder
- Set ObjFolder :DebugObjects:
- Set COptions "{COptions} -k {ObjFolder}"
- End
-
- # make sure the object folders are available
- Export ObjFolder
- If !`Exists "{ObjFolder}" -d`
- NewFolder "{ObjFolder}"
- End
-
- # create the make script
- Make "{ObjFolder}"DoubleBuffer ∂
- -d COptions="{COptions}" ∂
- -d ROptions="{ROptions}" ∂
- "{MOptions}" > MakeOut
-
- # write progress output to the user's worksheet
- Begin
- Echo ∂n
- Echo "———————————————————————"
- Echo -n ∂t"◊ "
- Date -a
- Set StartTime `Date -n`
-
- MakeOut
- Delete MakeOut -i
-
- Set TimeNow `Date -n`
- Set Elapsed `Evaluate {TimeNow}-{StartTime}`
- Echo "———————————————————————"
- Set Elapsed "`Date -c {Elapsed} -t`"
- If "{Elapsed}" =~ /12:([0-9]+:[0-9]+)®1 [AP]M/
- Set Elapsed "0:{®1}"
- Else If "{Elapsed}" =~ /0*([0-9]+:[0-9]+:[0-9]+)®1 [AP]M/
- Set Elapsed "{®1}"
- End
- Echo "∂t◊ Build time: {Elapsed}"
- Echo "———————————————————————"
-
- # output the name of the build and select it for the user
- Echo ∂t∂""{ObjFolder}"DoubleBuffer∂"
- Find ¡2 "{Worksheet}"
- Find /∂"/Δ:Δ/∂"/ "{Worksheet}"
-
- Unset StartTime
- Unset TimeNow
- Unset Elapsed
- End ∑∑ "{Worksheet}"
-
- Exit
- #
-
-